package io.gitee.zhangbinhub.acp.boot.conf;

import io.gitee.zhangbinhub.acp.boot.constant.AcpCoreConstant;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.HashMap;
import java.util.Map;

@ConfigurationProperties(prefix = AcpCoreConstant.SCHEDULE_PROPERTIES_PREFIX)
public class AcpScheduleConfiguration {
    public Map<String, String> getCron() {
        return cron;
    }

    public void setCron(Map<String, String> cron) {
        this.cron = cron;
    }

    public Boolean getAutoRestart() {
        return autoRestart;
    }

    public void setAutoRestart(Boolean autoRestart) {
        this.autoRestart = autoRestart;
    }

    /**
     * cron expression list
     * key => bean name
     * value => cron
     */
    private Map<String, String> cron = new HashMap<>();
    private Boolean autoRestart = true;
}
